package com.zhao.common.support;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.User;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;

import com.zhao.data.mapper.AccountMapper;
import com.zhao.data.model.Account;

public class AppUserDetailsService implements UserDetailsService {

	@Autowired
	AccountMapper accountMapper;

	@Override
	public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
		// TODO Auto-generated method stub
		return null;
	}

/*	@Override
	public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
		Account account = accountMapper.selectByUsername(username);
		List<SimpleGrantedAuthority> grantedAuthorityList = new ArrayList<SimpleGrantedAuthority>();
		return new User(account.getUsername(), account.getPassword(), grantedAuthorityList);
	}*/
}
